package com.metis.document.parse.dialog.models.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.jetbrains.annotations.NotNull;

/**
 * @author: wuzhijun
 * @date: 2022/11/23
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("PDF文件的尺寸信息")
public class PDFSizeDTO implements Comparable<PDFSizeDTO> {
    @ApiModelProperty("PDF文件的页码")
    private Integer page;
    @ApiModelProperty("PDF文件的宽度,单位为像素")
    private Double width;
    @ApiModelProperty("PDF文件的高度,单位为像素")
    private Double height;

    @Override
    public int compareTo(@NotNull PDFSizeDTO o) {
        return this.page - o.page;
    }
}
